console.log("输入姓名、邮箱、QQ号、手机号");
var user = {
    username: "",
    email: "",
    qq: "",
    phone: ""
}
var stdin = process.stdin;
var index = 0;
var infor = [];
console.log("username:");

stdin.on("data", function (chunk) {
    var str = chunk.toString("utf-8");
    infor[index] = str;

    if (index == 0) {
        user.username = infor[index];
        index++;

        console.log("email:");
    } else if (index == 1) {
        user.email = infor[index];
        index++;

        console.log("qq:");
    } else if (index == 2) {
        user.qq = infor[index];
        index++;

        console.log("phone:");
    } else if (index == 3) {
        user.phone = infor[index];
        
        console.log(user);
        process.exit();
    } 

})



